﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta name="keywords" content="设置关键词..." />
    <meta name="description" content="设置描述..." />
    <meta name="author" content="DeathGhost" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <link rel="icon" href="~/images/icon/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="~/css/style.css" />

    <script src="~/javascript/jquery.js"></script>
    <script src="~/javascript/plug-ins/customScrollbar.min.js"></script>
    <script src="~/javascript/plug-ins/echarts.min.js"></script>
    <script src="~/javascript/plug-ins/layerUi/layer.js"></script>
    <script src="~/ueditor/ueditor.config.js"></script>
    <script src="~/ueditor/ueditor.all.js"></script>
    <script src="~/javascript/plug-ins/pagination.js"></script>
    <script src="~/javascript/public.js"></script>
    <title></title>

</head>
<body>
    <div class="main-wrap">
        <div class="side-nav">
            <div class="side-logo">
                <div class="logo">
                    <strong>国家档案局华档孵化器</strong>
                </div>
            </div>

            <nav class="side-menu content mCustomScrollbar" data-mcs-theme="minimal-dark">
                <h2>
                    <a href="/Index/MainNew" class="InitialPage"><i class="icon-dashboard"></i>首页</a>
                </h2>
                <ul id="menu"></ul>
            </nav>
            @*<footer class="side-footer">© DeathGhost 版权所有</footer>*@
        </div>
        <div class="content-wrap">
            <header class="top-hd">
                <div class="hd-lt">
                    <a class="icon-reorder"></a>
                </div>
                <div class="hd-rt">
                    <ul>
                        
                        <li>
                            <a href="/Login/Index" id="JsSignOut"><i class="icon-signout"></i>安全退出</a>
                        </li>
                    </ul>
                </div>
            </header>
            
            @RenderBody()


            @*<footer class="btm-ft">
                <p class="clear">
                    <span class="fl">©Copyright 2016 <a href="#" title="DeathGhost" target="_blank">DeathGhost.cn</a></span>
                    <span class="fr text-info">
                        <em class="uppercase">
                            <i class="icon-user"></i>
                            author:deathghost
                        </em> |
                        <em class="uppercase">
                            <i class="icon-envelope-alt"></i>
                            更多模板： <a href="http://www.mycodes.net/" target="_blank">源码之家</a>
                        </em>
                        <a onclick="reciprocate()" class="text-primary"><i class="icon-qrcode"></i>捐赠</a>
                    </span>
                </p>
            </footer>*@
        </div>
    
    </div>
</body>
</html>
@*<script src="~/Scripts/jquery-1.10.2.js"></script>*@
<script type="text/javascript">
    GetParentMenu();
    function GetParentMenu() {

        $.ajax({
            type: "POST",
            url: '/SysMenu/GetParentMenu',
            success: function (result) {

                if (result[0].MenuName == undefined) {
                    return;
                }
                var $li = "";
                $(result).each(function (i, d) {
                    // $li += "<li><a onclick='Getjunior(" + d.ID + ",\"#ul" + i + "\")' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-notes_2 sidebar-nav-icon'></i>" + d.MenuName + "</a><ul id='ul" + i + "' class='ulmenu'></ul></li>";
                    $li += "<li> <dl> <dt id='dt" + i + "' onclick='GetSubMenu(\"" + d.ID + "\",\"#dt" + i + "\")' >  <i class='icon-columns' ></i>" + d.MenuName + "<i class='icon-angle-right'></i> </dt></dl></li>";

                });
                $("#menu").append($li);
            },
            error: function (e) {

            }
        });
    }
    var num = 1;
    function GetSubMenu(id, dt) {



        $.ajax({
            type: "POST",
            url: '/SysMenu/GetSubMenu?menuId=' + id,
            success: function (result) {

                if (result[0].MenuName == undefined) {
                    return;
                }
                var $dt = "";
                var id = $dt + "  " + "dd";
                $(id).remove();
                $(result).each(function (i, d) {
                    if (d.MenuUrl == "") d.MenuUrl = "#";

                    $dt += "<dd > <a href='" + d.MenuUrl + "'>" + d.MenuName + "</a> </dd>";
                });
                $(dt).after($dt);
                $('.side-menu li dt').parents('li').addClass('open');
                $('.side-menu li dt').parents('.side-menu').find('.InitialPage').removeClass('active');
                $('.side-menu li dt').parents('li').siblings().removeClass('open');
                $('.side-menu dd a').parents('li').addClass('open');
                $('.side-menu dd a').parents('li').siblings().removeClass('open')


            },
            error: function (e) {

            }
        });

    }

</script>

